<div class="tooltip-container">
  <span class="tooltip">Uiverse.io</span>
  <span class="text">Tooltip</span>
</div>

<style>
/* From Uiverse.io by johnliter  - Tags: simple, flashy, tooltip, button, theme-switch, code, gradients, light&dark */
/* Style for the tooltip container */
.tooltip-container {
  --background-light: #ff5555; /* Red */
  --background-dark: #000000; /* Black */
  --text-color-light: #ffffff;
  --text-color-dark: #ffffff;
  --bubble-size: 12px;
  --glow-color: rgba(255, 255, 255, 0.5); /* Brighter glow color */

  position: relative;
  background: var(--background-light);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 17px;
  padding: 0.7em 1.8em;
  color: var(--text-color-light);
  border-radius: 8px; /* Rounded edges */
}

/* Style for the bubble tooltip */
.tooltip {
  position: absolute;
  top: -100%; /* Initially hidden above the container */
  left: 50%;
  transform: translateX(-50%);
  padding: 0.6em 1em;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s;
  border-radius: var(--bubble-size);
  background: var(--background-light);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Triangle arrow for the bubble tooltip */
.tooltip::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%);
  border-style: solid;
  border-width: 8px 8px 0;
  border-color: var(--background-light) transparent transparent;
}

/* Tooltip appearance on hover */
.tooltip-container:hover {
  background: var(--background-dark);
  color: var(--text-color-dark);
  box-shadow: 0 0 20px var(--glow-color); /* Brighter glow effect */
}

.tooltip-container:hover .tooltip {
  top: -120%; /* Adjusted position for the bubble tooltip */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

</style>
    